/*
 * @Description: 邮件API接口
 * @Author: QianLong
 * @Date: 2019-07-07 19:06:52
 * @LastEditors    : QianLong
 * @LastEditTime   : 2023-02-15 14:24:42
 */
import http from '@/utils/http/axios'

export function getServerList(params) {
  return http.request({
    url: '/file/server_list',
    method: 'GET',
    params
  })
}
export function getList(params) {
  return http.request({
    url: '/file/tpl_list',
    method: 'GET',
    params
  })
}
export function getCateList(params) {
  return http.request({
    url: '/file/cate_list',
    method: 'GET',
    params
  })
}
export function getLogList(params) {
  return http.request({
    url: '/file/file_list',
    method: 'GET',
    params
  })
}
export function getAllServerList(params) {
  return http.request({
    url: '/file/all_server_list',
    method: 'GET',
    params
  })
}
export function getAllList(params) {
  return http.request({
    url: '/file/all_tpl_list',
    method: 'GET',
    params
  })
}
export function getAllCateList(params) {
  return http.request({
    url: '/file/all_cate_list',
    method: 'GET',
    params
  })
}
export function getSendSetting(params) {
  return http.request({
    url: '/file/send_setting',
    method: 'GET',
    params
  })
}
export function editSendSetting(params) {
  return http.request(
    {
      url: '/file/send_setting',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function doSendEmail(params) {
  return http.request(
    {
      url: '/file/send_email',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function delServerItem(params) {
  return http.request(
    {
      url: '/file/del_server',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function delItem(params) {
  return http.request(
    {
      url: '/file/del_tpl',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function delEmailLog(params) {
  return http.request(
    {
      url: '/file/del_file_log',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function delFileBatch(params) {
  return http.request(
    {
      url: '/file/del_file_batch',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function reSendEmailBatch(params) {
  return http.request(
    {
      url: '/file/resend_file_batch',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function delCate(params) {
  return http.request(
    {
      url: '/file/del_cate',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function editServerInfo(params) {
  return http.request(
    {
      url: '/file/edit_server_info',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function editCateInfo(params) {
  return http.request(
    {
      url: '/file/edit_cate_info',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function testServer(params) {
  return http.request(
    {
      url: '/file/test_server',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function editInfo(params) {
  return http.request(
    {
      url: '/file/edit_tpl_info',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function allLogData(params) {
  return http.request(
    {
      url: '/file/all_data',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function getFromAds(params) {
  return http.request({
    url: '/file/all_file_data',
    method: 'GET',
    params
  })
}
export function getFromSingleEmail(params) {
  return http.request({
    url: '/file/single_file_data',
    method: 'GET',
    params
  })
}
